import paramiko


def ssh_commod(command):
    try:
        client = paramiko.SSHClient()
        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        client.connect(hostname='192.168.32.128',port=22,username='root',password='123456')
        stdin, stdout, stderr = client.exec_command(command)
        for line in stdout:
            print(line.strip("\n"))
        client.close()
    except Exception as e:
        print(e)

if __name__ == '__main__':
    ssh_commod('df')
    print('-----------')
    ssh_commod('free')